//
//  SlideMenuView.m
//  AnimationDemo
//
//  Created by 马滕亚 on 2020/6/11.
//  Copyright © 2020 M.Y.A. All rights reserved.
//

#import "SlideMenuView.h"

@interface SlideMenuView () {
    UIVisualEffectView *blurView;
    UIView *helperSideView;
    UIView *helperCenterView;
    CGFloat diff;
    UIColor *menuColor;
    CADisplayLink *displayLink;
    NSInteger animationCount;
    UIWindow *keyWindow;
    BOOL switched;
}

@end

@implementation SlideMenuView

- (id)initWithBtnTitle:(NSArray *)btnTitle {
    self = [super init];
    if (self) {
        menuColor = [UIColor colorWithRed:0 green:0.722 blue:1 alpha:1];
        keyWindow = [UIApplication sharedApplication].keyWindow;
        blurView = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]];
        blurView.frame = keyWindow.frame;
        blurView.alpha = 0.5;
        self.frame = CGRectMake(-CGRectGetWidth(keyWindow.frame)/2, 0, CGRectGetWidth(keyWindow.frame)/2, CGRectGetHeight(keyWindow.frame));
        [keyWindow addSubview:self];
    }
    return self;
}

- (void)switchAction {
    if (!switched) {
        switched = true;
    }
}


@end
